Options
All
  • Public
  • Public/Protected
  • All
Menu

ts-functional-pipe

Index

Type aliases

Func

Func<TArgs, TOut>: (...args: TArgs) => TOut

Type parameters

  • TArgs: any[]

  • TOut

Type declaration

    • (...args: TArgs): TOut
    • Parameters

      • Rest ...args: TArgs

      Returns TOut

UnaryFunction

UnaryFunction<TIn, TOut>: Func<[TIn], TOut>

Type parameters

  • TIn

  • TOut

Functions

Const applyArgs

  • applyArgs<A>(...args: A): To<A>
  • Helper function to apply arguments to a selected function with type-inference for the supplied function. For instance, in the following statement applyArg(1).to((x) => x + 1), the type of x is correctly inferred to be number

    Type parameters

    • A: any[]

    Parameters

    • Rest ...args: A

      the argument list to be supplied... the argument list of the function supplied to the to clause (see below) should match this list

    Returns To<A>

    an object with a single method, .to(f) where f is the function to which param (...args) will be passed. The return type of this method will match the return type of f

compose

Const deferP0

  • deferP0<P0, A, R>(fn: (src: P0, ...args: A) => R): (...args: A) => (src: P0) => R
  • Curry 1st parameter of a function

    Type parameters

    • P0

    • A: any[]

    • R

    Parameters

    • fn: (src: P0, ...args: A) => R

      a function of form (p0: P0, p1: P1, p2: P2) => R

        • (src: P0, ...args: A): R
        • Parameters

          • src: P0
          • Rest ...args: A

          Returns R

    Returns (...args: A) => (src: P0) => R

    a function of form (p1: P1, p2: P2) => (p0: P0) => R

      • (...args: A): (src: P0) => R
      • Parameters

        • Rest ...args: A

        Returns (src: P0) => R

          • (src: P0): R
          • Parameters

            • src: P0

            Returns R

pipe

pipeInto

Generated using TypeDoc